/*
 *
 * Copyright 2018-2020,2022,2023 NXP.
 *
 * NXP Confidential. This software is owned or controlled by NXP and may only be
 * used strictly in accordance with the applicable license terms. By expressly
 * accepting such terms or by downloading,installing, activating and/or otherwise
 * using the software, you are agreeing that you have read,and that you agree to
 * comply with and are bound by, such license terms. If you do not agree to be
 * bound by the applicable license terms, then you may not retain, install, activate
 * or otherwise use the software.
 *
 */

#include "PrintUtility.h"
#include "phNxpLogApis_App.h"

EXTERNC void printDeviceInfo(const phUwbDevInfo_t *pdevInfo)
{
    if (pdevInfo != NULL) {
        NXPLOG_APP_D("--------------Stack Capabilities--------------\n");
        NXPLOG_APP_D("UCI Version                        : %" PRIu8 ".%" PRIu8 "\n",
            (uint8_t)(pdevInfo->uciGenericVersion >> 8),
            (uint8_t)pdevInfo->uciGenericVersion);
        NXPLOG_APP_D("MAC Version                        : %" PRIu8 ".%" PRIu8 " \n",
            pdevInfo->macMajorVersion,
            pdevInfo->macMinorMaintenanceVersion);
        NXPLOG_APP_D("PHY Version                        : %" PRIu8 ".%" PRIu8 " \n",
            pdevInfo->phyMajorVersion,
            pdevInfo->phyMinorMaintenanceVersion);
        NXPLOG_APP_D("UCI Test Version                   : %" PRIu8 ".%" PRIu8 " \n",
            (uint8_t)(pdevInfo->uciTestVersion >> 8),
            (uint8_t)pdevInfo->uciTestVersion);
        NXPLOG_APP_D("Device Name                        : %s\n", pdevInfo->devName);
        NXPLOG_APP_I(" FW Version                        : %d.%d.%d\n",
            pdevInfo->fwMajor,
            pdevInfo->fwMinor,
            pdevInfo->fwPatchVersion);
        NXPLOG_APP_D(
            "Device Version                     : %" PRIu8 ".%" PRIu8 " \n", pdevInfo->devMajor, pdevInfo->devMinor);
        NXPLOG_APP_D("R4 SerialNo                        : %s \n", pdevInfo->serialNo);
        NXPLOG_APP_I("DSP Version                        : %d.%d.%d\n",
            pdevInfo->dspMajor,
            pdevInfo->dspMinor,
            pdevInfo->dspPatchVersion);
        NXPLOG_APP_D(
            "Base Band  Version                 : %" PRIu8 ".%" PRIu8 " \n", pdevInfo->bbMajor, pdevInfo->bbMinor);
        NXPLOG_APP_D("CCC Version                        : %s \n", pdevInfo->cccVersion);
        NXPLOG_APP_D(
            "Middleware Version                 : %" PRIu8 ".%" PRIu8 "\n", pdevInfo->mwMajor, pdevInfo->mwMinor);
    }
}
